package cn.modoumama.entity;

import org.apache.commons.lang3.time.DateFormatUtils;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * 类名称：Steel对象定义<br>
 * 类描述：钢材信息<br>
 * 创建人：dengqiang<br>
 * 
 * @version V1.0
 */

public class SteelModel implements Serializable, Cloneable {

	/** uid */
	private static final long serialVersionUID = 1L;
	/** 主键 */
	private Integer idSql;
	/** id */
	private Integer id;
	/** big */
	private BigDecimal big;
	/** 模型类别 */
	private String model;
	/** 族名 */
	private String name;
	/** 族类型 */
	private String type;
	/** 代码 */
	private String code;
	/** 单项日期数据 */
	private Map<String, Object> dateData = new HashMap<>();

	private Son son;

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	private Date date;

	/** 取得主键 */
	public Integer getIdSql() {
		return idSql;
	}

	/** 设置主键 */
	public void setIdSql(Integer idSql) {
		this.idSql = idSql;
	}

	/** 取得id */
	public Integer getId() {
		return id;
	}

	/** 设置id */
	public void setId(Integer id) {
		this.id = id;
	}

	/** 取得模型类别 */
	public String getModel() {
		return model;
	}

	/** 设置模型类别 */
	public void setModel(String model) {
		this.model = model;
	}

	/** 取得族名 */
	public String getName() {
		return name;
	}

	/** 设置族名 */
	public void setName(String name) {
		this.name = name;
	}

	/** 取得族类型 */
	public String getType() {
		return type;
	}

	/** 设置族类型 */
	public void setType(String type) {
		this.type = type;
	}

	/** 取得代码 */
	public String getCode() {
		return code;
	}

	/** 设置代码 */
	public void setCode(String code) {
		this.code = code;
	}

	public Son getSon() {
		return son;
	}

	public void setSon(Son son) {
		this.son = son;
	}

	public Map<String, Object> getDateData() {
		return dateData;
	}

	public void setDateData(Map<String, Object> dateData) {
		this.dateData = dateData;
	}
	
	public void addDateData(SteelModel steelModel) {
		this.dateData.put(DateFormatUtils.format(date, "yyyy-MM-dd"), steelModel);
	}

	public BigDecimal getBig() {
		return big;
	}

	public void setBig(BigDecimal big) {
		this.big = big;
	}

	public SteelModel clone(){
		SteelModel steelModel = null;
		try {
			steelModel = (SteelModel) super.clone();
		} catch (CloneNotSupportedException e) {
			e.printStackTrace();
		}
		return steelModel;
	}
}
